package com.itheima.homework;

public class CatDog {
    public static void main(String[] args) {
        Cat c = new Cat();
        c.setColor("花色");
        c.setBreed("波斯猫");
        c.eat();
        c.catchMouse();
        Cat c2 = new Cat("花色", "波斯猫");
        c2.eat();
        c2.catchMouse();
        Dog d = new Dog();
        d.setColor("黑色");
        d.setBreed("藏獒");
        d.eat();
        d.lookhome();
        Dog d2 = new Dog("黑色", "藏獒");
        d2.eat();
        d2.lookhome();


    }
}

class Cat {
    private String color;
    private String breed;

    public Cat() {
    }

    public Cat(String color, String breed) {
        this.color = color;
        this.breed = breed;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getColor() {
        return color;
    }

    public void setBreed(String breed) {
        this.breed = breed;
    }

    public String getBreed() {
        return breed;
    }

    public void catchMouse() {
        System.out.println(color + "的" + breed + "正在逮老鼠...");
    }

    public void eat() {
        System.out.println(color + "的" + breed + "正在吃鱼...");
    }
}

class Dog {
    private String color;
    private String breed;

    public Dog() {
    }

    public Dog(String color, String breed) {
        this.color = color;
        this.breed = breed;
    }


    public void setColor(String color) {
        this.color = color;
    }

    public String getColor() {
        return color;
    }

    public void setBreed(String breed) {
        this.breed = breed;
    }

    public String getBreed() {
        return breed;
    }

    public void lookhome() {
        System.out.println(color + "的" + breed + "正在看家...");
    }

    public void eat() {
        System.out.println(color + "的" + breed + "正在啃骨头...");
    }

}